package com.atguigu.springcloud.controller;

import com.atguigu.springcloud.entities.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
@Slf4j
public class PaymentConsulController {
    @Value("${server.port}")
    private Integer serverPort;
    @GetMapping("/payment/consul")
    public CommonResult<String> getInfo() {
        log.info("访问PaymentZkController的接口成功");
        return new CommonResult<>(200, "使用Consul,端口是" + serverPort + ",随机ID" + UUID.randomUUID());
    }
}
